<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>销售提成</title>
    <th:block th:include="statics/common/page/header"></th:block>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row class="search-panel-space">
            <div class="search-group">
                <i-col span="5">
                	<label class="search-label-20">名称:</label>
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称" class="search-item-width-75"/>
                </i-col>
                <i-col span="5">
                    <label class="search-label-20">类别:</label>
                    <i-select v-model="q.classify" class="search-item-width-75">
                        <i-option :value="1">车辆</i-option>
                        <i-option :value="2">精品</i-option>
                        <i-option :value="3">衍生</i-option>
                    </i-select>
                </i-col>
                <i-col span="5">
                    <label class="search-label-20">类型:</label>
                    <i-select v-model="q.type" class="search-item-width-75">
                        <i-option :value="1">百分比</i-option>
                        <i-option :value="2">金额</i-option>
                    </i-select>
                </i-col>
                <i-col span="5">
                    <label class="search-label-20">状态:</label>
                    <i-select v-model="q.status" class="search-item-width-75">
                        <i-option :value="0">禁用</i-option>
                        <i-option :value="1">正常</i-option>
                    </i-select>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>    
        <Row :gutter="16">
            <div class="buttons-group">
                <i-button type="info" @click="add" th:if="${@shiroAuthService.hasPermission('baseroyalty:save')}">
                	<i class="fa fa-plus"></i>&nbsp;新增</i-button>
                <i-button type="warning" @click="update" th:if="${@shiroAuthService.hasPermission('baseroyalty:update')}">
                	<i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                <i-button type="error" @click="del" th:if="${@shiroAuthService.hasPermission('baseroyalty:delete')}">
                	<i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="baseRoyalty" :rules="ruleValidate" :label-width="80">
            <Form-item label="名称" prop="name">
                <i-input v-model="baseRoyalty.name" placeholder="名称"/>
            </Form-item>
            <Form-item label="类别" prop="classify">
            	<Radio-group v-model="baseRoyalty.classify">
                    <Radio label="1">
                        <span>单车</span>
                    </Radio>
                    <Radio label="2">
                        <span>精品</span>
                    </Radio>
                    <Radio label="3">
                        <span>衍生</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="类型" prop="type">
            	<Radio-group v-model="baseRoyalty.type">
                    <Radio label="1">
                        <span>百分比</span>
                    </Radio>
                    <Radio label="2">
                        <span>金额</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="备注" prop="content" >
                <i-input type="textarea" v-model="baseRoyalty.content" placeholder="备注"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script th:src="@{../statics/js/product/baseroyalty.js}"></script>
</body>
</html>